#include <iostream>
#include <cstdio>
#include <iterator>
#include <algorithm>
#include <string>
#include <vector>
#include "tinyxml.h"

using namespace std;

struct PathInfo
{
	string sTagName;
	int count;
};

struct LotteryInfo
{
	string sName;
	string sStartTime;
	string sEndTime;
	int	iInterval;
	vector<PathInfo> vPaths;
};


vector<PathInfo> parseXpathInfo(TiXmlElement* pXpathRoot);
vector<LotteryInfo> parseConfigFile(string sConfigFile);
vector<string> parseLotteryResult(string sXmlString, LotteryInfo& rLotteryInfo);

void printPathInfo(PathInfo& rPathInfo);
void printPathVector(vector<PathInfo>& vPaths);
void printLotteryInfo(LotteryInfo& rLotteryInfo);
void printLotterys(vector<LotteryInfo>& rlotteries);